# -*-coding:utf-8 -*-


import jsonrpclib
import argparse
import sys

ap = argparse.ArgumentParser()
ap.add_argument('-i', '--host_ip', default='127.0.0.1', help='jsonrpc server hosting ip')

args = ap.parse_args(sys.argv[1:])

server = jsonrpclib.Server('http://{host_ip}:8080/dubbo-web-jsonrpc/com.yibing.dubbo.service.UserService'.format(host_ip=args.host_ip))
ct = server.queryAll()
print 'current time: %s' % ct
print jsonrpclib.history.request

